package stuManagement.action;

import java.util.List;

import stuManagement.biz.StudentBiz;
import stuManagement.entity.Student;

import com.opensymphony.xwork2.ActionSupport;

public class StudentAction extends ActionSupport {
	private StudentBiz studentBiz;

	public void setStudentBiz(StudentBiz studentBiz) {
		this.studentBiz = studentBiz;
	}
	
	private List<Student> studentList;

	public List<Student> getStudentList() {
		return studentList;
	}

	private Student student;

	public void setStudent(Student student) {
		this.student = student;
	}
	public Student getStudent() {
		return student;
	}


	public String index(){
		studentList = studentBiz.getAll();
		return SUCCESS;
	}
	
	public String add(){
		studentBiz.add(student);
		return SUCCESS;
	}
}
